package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Client;
import cn.wolfcode.crm.query.ObjectQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ClientMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Client record);

    Client selectByPrimaryKey(Long id);

    List<Client> selectAll();

    int updateByPrimaryKey(Client record);

    int queryForCount(ObjectQuery qo);

    List<Client> queryForList(ObjectQuery qo);



    void updateCustomerManager(Client client);

    /**
     * 客户移动到资源池
     *
     * @param client 传入要移动要资源池的客户对象
     */
    void changeClientState(Client client);

    List<Client> queryForClientWhichCompensate(@Param("keyword") String keyword);

    int selectClientAccount();

    int selectDClientAccount();
}